#ifndef NORMALWIDGET_H
#define NORMALWIDGET_H


#include<QWidget>
#include<QPushButton>
#include<QHBoxLayout>
#include<QVBoxLayout>
#include<QGridLayout>

class NormalWidget:public QWidget
{
private:
    QPushButton* btnL;
    QPushButton* btnR;
    QHBoxLayout* hlay;
    QVBoxLayout* vlay;
    QGridLayout* glay;
public:
    ~NormalWidget()
    {
    }
    NormalWidget(QWidget* parent = nullptr):QWidget(parent)
    {
        btnL = new QPushButton(this);
        btnR = new QPushButton(this);
        btnL->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);//关键是这个，如果仅仅是设置QHBoxLayout布局，我发现仅仅会随着窗口放大而横向伸缩，垂直方向就不行
        btnR->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

        hlay = new QHBoxLayout(this);
        hlay->addWidget(btnL);
        hlay->addWidget(btnR);
    }
};





#endif // NORMALWIDGET_H
